/**
 * @param {number} x
 * @return {boolean}
 */
var isPalindrome = function(x) {
  x = x + '';
  if(x.length === 1) return true;
  x = x.split('');
  return x.join('') == x.reverse().join('');
};
let x = 121;
console.log(isPalindrome(x));
x = -121;
console.log(isPalindrome(x));
x = 10;
console.log(isPalindrome(x));
